#pragma once
#include <cstring>

struct Array
{
	int* array;
	int len;
	
	Array(int l) : len(l)
	{
		array = new int[len];
		memset(array, 0, sizeof(int) * len);
	}
	
	void clean()
	{
		delete [] array;
	}
	
	int& operator[](int i)
	{
		return array[i];
	}
};

extern Array findLongestSubsequence(Array& array1, Array& array2);